﻿<visi:VisiPage x:Class="VNet.VisiSuite.VisiAdmin.Views.AreaDetailsView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:visi="clr-namespace:VNet.VisiSuite.VisiAdmin.Controls"
        xmlns:vm="clr-namespace:VNet.VisiSuite.VisiAdmin.ViewModels" xmlns:c="clr-namespace:VNet.VisiSuite.VisiAdmin.Controls"
        xmlns:vuc="clr-namespace:VNet.VisiSuite.Controls;assembly=VNet.VisiSuite.Controls" xmlns:converter="clr-namespace:VNet.VisiSuite.VisiAdmin.Common.Converters"
        xmlns:helper="clr-namespace:VNet.VisiSuite.VisiAdmin.Common.Helpers" xmlns:dg="http://infragistics.com/DataPresenter" xmlns:igDock="http://infragistics.com/DockManager"
        xmlns:igWindows="http://infragistics.com/Windows" xmlns:ig="http://schemas.infragistics.com/xaml" xmlns:igDP="http://infragistics.com/DataPresenter"
        xmlns:system="clr-namespace:System;assembly=mscorlib"
               DataContext="{DynamicResource AreaDetailsViewModel}" mc:Ignorable="d" d:DesignHeight="371.713"
        d:DesignWidth="925.16">
    <visi:VisiPage.Resources>
        <vm:AreaDetailsViewModel x:Key="AreaDetailsViewModel" />
        <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
        <converter:SelectedValuesConverter x:Key="SelectedValuesConverter" />
        <converter:InvertBooleanConverter x:Key="InvertBooleanConverter" />
        <converter:ObjectNullVisibilityConverter x:Key="ObjectNullVisibilityConverter" />
        <converter:InvertBooleanVisibilityConverter x:Key="InvertBooleanVisibilityConverter" />
        <converter:ReasonCodeToTextConverter x:Key="ReasonCodeToTextConverter" />

        <Style x:Key="NumericInputStyle" BasedOn="{StaticResource PropertyXamNumericInputStyle}" TargetType="vuc:XamNumericInputEx">
            <Setter Property="TrimFractionalZeros" Value="True" />
            <Setter Property="ValueTypeName" Value="Int32" />
            <Setter Property="ClipMode" Value="Raw" />
            <Setter Property="InvalidValueBehavior" Value="RevertValue" />
            <Setter Property="SpinButtonDisplayMode" Value="Always" />
            <Setter Property="ValueConstraint">
                <Setter.Value>
                    <ig:ValueConstraint MinInclusive="0" />
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="PercentageInputStyle" BasedOn="{StaticResource PropertyXamNumericInputStyle}" TargetType="vuc:XamNumericInputEx">
            <Setter Property="TrimFractionalZeros" Value="True" />
            <Setter Property="ValueTypeName" Value="short" />
            <Setter Property="ClipMode" Value="Raw" />
            <Setter Property="InvalidValueBehavior" Value="RevertValue" />
            <Setter Property="SpinButtonDisplayMode" Value="Always" />
            <Setter Property="ValueConstraint">
                <Setter.Value>
                    <ig:ValueConstraint MinInclusive="0" MaxInclusive="100" />
                </Setter.Value>
            </Setter>
        </Style>

    </visi:VisiPage.Resources>
    <!--    <vuc:BusyIndicator  IsBusy="{Binding IsBusy}">-->
    <Grid Focusable="False" Background="{StaticResource WhiteColor}">
        <igDock:XamDockManager PaneDragStarting="PaneDragStarting">
            <igDock:ContentPane Style="{StaticResource NoHeaderPane}">
                <Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="*" />
                        <RowDefinition Height="42" />
                    </Grid.RowDefinitions>

                    <!--Header-->
                    <c:Header2Control Grid.Row="0" Title="{Binding PageTitle}" LeftMenuIcons="{Binding TopLeftButtonIcons}" RightMenuIcons="{Binding TopRightButtonIcons}" />

                    <!--Body-->
                    <Grid Grid.Row="1">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>

                        <TextBlock Style="{StaticResource CaptionTextBlockStyle}" Grid.Row="0" Text="Select an item from the list below to edit it." />
                        <TextBlock Style="{StaticResource ErrorTextBlockStyle}" Grid.Row="1" Text="{Binding ErrorMessage}"
                                    Visibility="{Binding ErrorMessage,Converter={StaticResource ObjectNullVisibilityConverter},ConverterParameter=Collapsed}" />

                        <Grid Grid.Row="2">
                            <igWindows:XamTabControl Style="{StaticResource XamTabControlStyle}" SelectedItem="{Binding SelectedTabItem}">
                                <igWindows:TabItemEx Header="{Binding ShiftTabHeader}" Style="{StaticResource TabItemExStyle}">
                                    <dg:XamDataPresenter DataSource="{Binding Path=AreaShifts}" ActiveDataItem="{Binding SelectedObject}" Style="{StaticResource XamDataPresenterStyle}">
                                        <dg:XamDataPresenter.FieldSettings>
                                            <dg:FieldSettings AllowEdit="False" AllowRecordFiltering="True" LabelClickAction="Nothing" />
                                        </dg:XamDataPresenter.FieldSettings>
                                        <dg:XamDataPresenter.FieldLayoutSettings>
                                            <dg:FieldLayoutSettings HeaderPrefixAreaDisplayMode="FieldChooserButton" AutoGenerateFields="False" />
                                        </dg:XamDataPresenter.FieldLayoutSettings>
                                        <dg:XamDataPresenter.FieldLayouts>
                                            <dg:FieldLayout>
                                                <dg:Field Name="Description" Label="Description" Width="*">
                                                    <dg:Field.Settings>
                                                        <dg:FieldSettings LabelClickAction="SortByOneFieldOnly" />
                                                    </dg:Field.Settings>
                                                </dg:Field>
                                                <dg:Field Name="StartTimeString" Label="Start Time" Width="*">
                                                    <dg:Field.Settings>
                                                        <dg:FieldSettings LabelClickAction="SortByOneFieldOnly" />
                                                    </dg:Field.Settings>
                                                </dg:Field>
                                                <dg:Field Name="EndTimeString" Label="End Time" Width="*">
                                                    <dg:Field.Settings>
                                                        <dg:FieldSettings LabelClickAction="SortByOneFieldOnly" />
                                                    </dg:Field.Settings>
                                                </dg:Field>
                                                <dg:Field Name="Enabled" Label="Enabled">
                                                    <dg:Field.Settings>
                                                        <dg:FieldSettings CellValuePresenterStyle="{StaticResource CheckBoxStyleGrid}" />
                                                    </dg:Field.Settings>
                                                </dg:Field>
                                                <dg:Field Name="Hidden" Label="Hide">
                                                    <dg:Field.Settings>
                                                        <dg:FieldSettings CellValuePresenterStyle="{StaticResource CheckBoxStyleGrid}" />
                                                    </dg:Field.Settings>
                                                </dg:Field>
                                                <dg:Field Visibility="Collapsed" Name="CreatedBy" Label="Created By" />
                                                <dg:Field Visibility="Collapsed" Name="CreatedDate" Label="Created Date" />
                                                <dg:Field Visibility="Collapsed" Name="LastUpdatedBy" Label="Last Updated By" />
                                                <dg:Field Visibility="Collapsed" Name="LastUpdatedDate" Label="Last Updated Date" />
                                            </dg:FieldLayout>
                                        </dg:XamDataPresenter.FieldLayouts>
                                    </dg:XamDataPresenter>
                                </igWindows:TabItemEx>

                                <igWindows:TabItemEx Header="{Binding RollupDefTabHeader}" Style="{StaticResource TabItemExStyle}">
                                    <dg:XamDataPresenter DataSource="{Binding Path=RollupDefinitions}" ActiveDataItem="{Binding SelectedObject}" Style="{StaticResource XamDataPresenterStyle}">
                                        <dg:XamDataPresenter.FieldSettings>
                                            <dg:FieldSettings AllowEdit="False" AllowRecordFiltering="True" LabelClickAction="Nothing" />
                                        </dg:XamDataPresenter.FieldSettings>
                                        <dg:XamDataPresenter.FieldLayoutSettings>
                                            <dg:FieldLayoutSettings HeaderPrefixAreaDisplayMode="FieldChooserButton" AutoGenerateFields="False" />
                                        </dg:XamDataPresenter.FieldLayoutSettings>
                                        <dg:XamDataPresenter.FieldLayouts>
                                            <dg:FieldLayout>
                                                <dg:Field Name="Description" Label="Description" Width="*">
                                                    <dg:Field.Settings>
                                                        <dg:FieldSettings LabelClickAction="SortByOneFieldOnly" />
                                                    </dg:Field.Settings>
                                                </dg:Field>
                                                <dg:Field Name="FontColorString" Label="Font Color" Visibility="Collapsed" />
                                                <dg:Field Name="ColorString" Label="Color" Width="*">
                                                    <dg:Field.Settings>
                                                        <dg:FieldSettings LabelClickAction="SortByOneFieldOnly">
                                                            <dg:FieldSettings.CellValuePresenterStyle>
                                                                <Style TargetType="{x:Type dg:CellValuePresenter}">
                                                                    <Setter Property="Template">
                                                                        <Setter.Value>
                                                                            <ControlTemplate TargetType="{x:Type dg:CellValuePresenter}">
                                                                                <Border BorderThickness="1" BorderBrush="{StaticResource LightGrayColor}" Margin="-1 -1 0 0"
                                                                                            Background="{Binding Path=Content,RelativeSource={RelativeSource TemplatedParent}}">
                                                                                    <TextBlock Style="{StaticResource TextBlockStyle}" Text="{Binding Cells[FontColorString].Value}"
                                                                                                Foreground="{Binding Cells[FontColorString].Value}" HorizontalAlignment="Center" Margin="5 8 5 0" />
                                                                                </Border>
                                                                            </ControlTemplate>
                                                                        </Setter.Value>
                                                                    </Setter>
                                                                </Style>
                                                            </dg:FieldSettings.CellValuePresenterStyle>
                                                        </dg:FieldSettings>
                                                    </dg:Field.Settings>
                                                </dg:Field>
                                                <dg:Field Name="FlashingTimeout" Label="Flashing Timeout (s)" Width="*">
                                                    <dg:Field.Settings>
                                                        <dg:FieldSettings LabelClickAction="SortByOneFieldOnly" />
                                                    </dg:Field.Settings>
                                                </dg:Field>
                                                <dg:Field Visibility="Collapsed" Name="CreatedBy" Label="Created By" />
                                                <dg:Field Visibility="Collapsed" Name="CreatedDate" Label="Created Date" />
                                                <dg:Field Visibility="Collapsed" Name="LastUpdatedBy" Label="Last Updated By" />
                                                <dg:Field Visibility="Collapsed" Name="LastUpdatedDate" Label="Last Updated Date" />
                                            </dg:FieldLayout>
                                        </dg:XamDataPresenter.FieldLayouts>
                                    </dg:XamDataPresenter>
                                </igWindows:TabItemEx>

                                <igWindows:TabItemEx Header="{Binding ReasonCodeTabHeader}" Style="{StaticResource TabItemExStyle}">

                                    <igDP:XamTreeGrid x:Name="xtg" DataSource="{Binding ReasonCodes}" ActiveDataItem="{Binding SelectedObject}" InitializeRecord="xtg_InitializeRecord">
                                        <igDP:XamTreeGrid.FieldSettings >
                                            <igDP:FieldSettings ExpandableFieldRecordExpansionMode="ExpandAlways" AllowEdit="False" AllowRecordFiltering="True" LabelClickAction="SortByOneFieldOnly" />
                                        </igDP:XamTreeGrid.FieldSettings>
                                        <igDP:XamTreeGrid.FieldLayoutSettings>
                                            <igDP:FieldLayoutSettings AutoGenerateFields="False" HeaderPrefixAreaDisplayMode="FieldChooserButton"  />
                                        </igDP:XamTreeGrid.FieldLayoutSettings>
                                        <igDP:XamTreeGrid.ViewSettings>
                                            <igDP:TreeViewSettings TreeFieldName="Description" IndentPerLevel="20"   />
                                        </igDP:XamTreeGrid.ViewSettings>
                                        <igDP:XamTreeGrid.FieldLayouts>
                                            <igDP:FieldLayout Key="Children">
                                                <igDP:FieldLayout.FieldSettings>
                                                    <igDP:FieldSettings ExpandableFieldRecordExpansionMode="ExpandAlways" />
                                                </igDP:FieldLayout.FieldSettings>
                                                <igDP:TextField Name="DescriptionWithLink" Label="Description" Width="2*" AllowEdit="False" />
                                                <igDP:TextField Name="RollupDefinitionDescription" Label="Rollup Definition" Width="1.3*" AllowEdit="False" />
                                                <igDP:Field Name="Category" Label="Category" AllowEdit="False" Width="1.1*" />
                                                <igDP:Field Name="ShopClockEvent" Label="Shop Clock" AllowEdit="False" Width="1.1*" />
                                                <igDP:TextField Name="FlashDelay" Label="Flash Delay" Width="1.1*" AllowEdit="False"/>
                                                <igDP:Field Name="IgnoreVisiBoxEvents" Label="Ignore VisiBox Events" Width="1.1*">
                                                    <igDP:Field.Settings>
                                                        <igDP:FieldSettings CellValuePresenterStyle="{StaticResource CheckBoxStyleGrid}" />
                                                    </igDP:Field.Settings>
                                                </igDP:Field>
                                                <igDP:Field Name="HideChildren" Label="Hide Child Nodes" Width="1.1*">
                                                    <igDP:Field.Settings>
                                                        <dg:FieldSettings CellValuePresenterStyle="{StaticResource CheckBoxStyleGrid}" />
                                                    </igDP:Field.Settings>
                                                </igDP:Field>
                                                <igDP:Field Name="DisplayInDowntimeChart" Label="Display In Downtime Chart" Width="1.1*">
                                                    <igDP:Field.Settings>
                                                        <dg:FieldSettings CellValuePresenterStyle="{StaticResource CheckBoxStyleGrid}" />
                                                    </igDP:Field.Settings>
                                                </igDP:Field>
                                                <igDP:Field Name="IgnoreInOeeCalc" Label="Ignore In OEE Calc" Width="1*">
                                                    <igDP:Field.Settings>
                                                        <dg:FieldSettings CellValuePresenterStyle="{StaticResource CheckBoxStyleGrid}" />
                                                    </igDP:Field.Settings>
                                                </igDP:Field>
                                                <igDP:Field Name="IgnoreInWaitingCalc" Label="Ignore In Waiting Calc" Width="1*">
                                                    <igDP:Field.Settings>
                                                        <dg:FieldSettings CellValuePresenterStyle="{StaticResource CheckBoxStyleGrid}" />
                                                    </igDP:Field.Settings>
                                                </igDP:Field>
                                                <igDP:Field Visibility="Collapsed" Name="CreatedBy" Label="Created By" />
                                                <igDP:Field Visibility="Collapsed" Name="CreatedDate" Label="Created Date" />
                                                <igDP:Field Visibility="Collapsed" Name="LastUpdatedBy" Label="Last Updated By" />
                                                <igDP:Field Visibility="Collapsed" Name="LastUpdatedDate" Label="Last Updated Date" />
                                                <igDP:Field Name="Children" />
                                            </igDP:FieldLayout>
                                        </igDP:XamTreeGrid.FieldLayouts>
                                    </igDP:XamTreeGrid>
                                </igWindows:TabItemEx>

                                <igWindows:TabItemEx Header="{Binding ScrapReasonCodeTabHeader}" Style="{StaticResource TabItemExStyle}">
                                    <igDP:XamTreeGrid x:Name="srcDataGrid" DataSource="{Binding ScrapReasonCodes}" ActiveDataItem="{Binding SelectedObject}" InitializeRecord="srcDataGrid_InitializeRecord">
                                        <igDP:XamTreeGrid.FieldSettings >
                                            <igDP:FieldSettings ExpandableFieldRecordExpansionMode="ExpandAlways" AllowEdit="False" AllowRecordFiltering="True" LabelClickAction="SortByOneFieldOnly" />
                                        </igDP:XamTreeGrid.FieldSettings>
                                        <igDP:XamTreeGrid.FieldLayoutSettings>
                                            <igDP:FieldLayoutSettings AutoGenerateFields="False" HeaderPrefixAreaDisplayMode="FieldChooserButton"  />
                                        </igDP:XamTreeGrid.FieldLayoutSettings>
                                        <igDP:XamTreeGrid.ViewSettings>
                                            <igDP:TreeViewSettings TreeFieldName="Description" IndentPerLevel="20"   />
                                        </igDP:XamTreeGrid.ViewSettings>
                                        <igDP:XamTreeGrid.FieldLayouts>
                                            <igDP:FieldLayout Key="Children">
                                                <igDP:FieldLayout.FieldSettings>
                                                    <igDP:FieldSettings ExpandableFieldRecordExpansionMode="ExpandAlways" />
                                                </igDP:FieldLayout.FieldSettings>
                                                <igDP:TextField Name="DescriptionWithLink" Label="Description" Width="2*" AllowEdit="False" />
                                                <igDP:TextField Name="RollupDefinitionDescription" Label="Rollup Definition" Width="1.3*" AllowEdit="False" Visibility="Collapsed" AllowHiding="Never" />
                                                <igDP:Field Name="Category" Label="Category" AllowEdit="False" Width="1.1*" />
                                                <igDP:TextField Name="FlashDelay" Label="Flash Delay" Width="1.1*" AllowEdit="False" Visibility="Collapsed" AllowHiding="Never" />
                                                <igDP:Field Name="IgnoreVisiBoxEvents" Label="Ignore VisiBox Events" Width="1.1*" Visibility="Collapsed" AllowHiding="Never">
                                                    <igDP:Field.Settings>
                                                        <igDP:FieldSettings CellValuePresenterStyle="{StaticResource CheckBoxStyleGrid}" />
                                                    </igDP:Field.Settings>
                                                </igDP:Field>
                                                <igDP:Field Name="HideChildren" Label="Hide Child Nodes" Width="1.1*" Visibility="Collapsed" AllowHiding="Never">
                                                    <igDP:Field.Settings>
                                                        <dg:FieldSettings CellValuePresenterStyle="{StaticResource CheckBoxStyleGrid}" />
                                                    </igDP:Field.Settings>
                                                </igDP:Field>
                                                <igDP:Field Name="DisplayInDowntimeChart" Label="Display In Downtime Chart" Width="1.1*" Visibility="Collapsed" AllowHiding="Never">
                                                    <igDP:Field.Settings>
                                                        <dg:FieldSettings CellValuePresenterStyle="{StaticResource CheckBoxStyleGrid}" />
                                                    </igDP:Field.Settings>
                                                </igDP:Field>
                                                <igDP:Field Name="IgnoreInOeeCalc" Label="Ignore In OEE Calc" Width="1*" Visibility="Collapsed" AllowHiding="Never">
                                                    <igDP:Field.Settings>
                                                        <dg:FieldSettings CellValuePresenterStyle="{StaticResource CheckBoxStyleGrid}" />
                                                    </igDP:Field.Settings>
                                                </igDP:Field>
                                                <igDP:Field Name="IgnoreInWaitingCalc" Label="Ignore In Waiting Calc" Width="1*" Visibility="Collapsed" AllowHiding="Never">
                                                    <igDP:Field.Settings>
                                                        <dg:FieldSettings CellValuePresenterStyle="{StaticResource CheckBoxStyleGrid}" />
                                                    </igDP:Field.Settings>
                                                </igDP:Field>
                                                <igDP:Field Visibility="Collapsed" Name="CreatedBy" Label="Created By" />
                                                <igDP:Field Visibility="Collapsed" Name="CreatedDate" Label="Created Date" />
                                                <igDP:Field Visibility="Collapsed" Name="LastUpdatedBy" Label="Last Updated By" />
                                                <igDP:Field Visibility="Collapsed" Name="LastUpdatedDate" Label="Last Updated Date" />
                                                <igDP:Field Name="Children" />
                                            </igDP:FieldLayout>
                                        </igDP:XamTreeGrid.FieldLayouts>
                                    </igDP:XamTreeGrid>
                                </igWindows:TabItemEx>

                                <igWindows:TabItemEx Header="{Binding AlarmSettingTabHeader}" Style="{StaticResource TabItemExStyle}">

                                    <dg:XamDataPresenter DataSource="{Binding Path=AlarmSettings}" ActiveDataItem="{Binding SelectedObject}" Style="{StaticResource XamDataPresenterStyle}">
                                        <dg:XamDataPresenter.FieldSettings>
                                            <dg:FieldSettings AllowEdit="False" AllowRecordFiltering="True" LabelClickAction="Nothing" />
                                        </dg:XamDataPresenter.FieldSettings>
                                        <dg:XamDataPresenter.FieldLayoutSettings>
                                            <dg:FieldLayoutSettings HeaderPrefixAreaDisplayMode="FieldChooserButton" AutoGenerateFields="False" />
                                        </dg:XamDataPresenter.FieldLayoutSettings>
                                        <dg:XamDataPresenter.FieldLayouts>
                                            <dg:FieldLayout>
                                                <dg:Field Name="FontColorString" Label="Font Color"  />
                                                <dg:Field Name="ColorString" Label="Color" Width="*">
                                                    <dg:Field.Settings>
                                                        <dg:FieldSettings LabelClickAction="SortByOneFieldOnly">
                                                            <dg:FieldSettings.CellValuePresenterStyle>
                                                                <Style TargetType="{x:Type dg:CellValuePresenter}">
                                                                    <Setter Property="Template">
                                                                        <Setter.Value>
                                                                            <ControlTemplate TargetType="{x:Type dg:CellValuePresenter}">
                                                                                <Border BorderThickness="1" BorderBrush="{StaticResource LightGrayColor}" Margin="-1 -1 0 0"
                                                                                            Background="{Binding Path=Content,RelativeSource={RelativeSource TemplatedParent}}">
                                                                                    <TextBlock Style="{StaticResource TextBlockStyle}" Text="{Binding Cells[FontColorString].Value}"
                                                                                                Foreground="{Binding Cells[FontColorString].Value}" HorizontalAlignment="Center" Margin="5 8 5 0" />
                                                                                </Border>
                                                                            </ControlTemplate>
                                                                        </Setter.Value>
                                                                    </Setter>
                                                                </Style>
                                                            </dg:FieldSettings.CellValuePresenterStyle>
                                                        </dg:FieldSettings>
                                                    </dg:Field.Settings>
                                                </dg:Field>
                                                <dg:Field Name="MinPercentageGood" Label="Min Percentage Good (%)" Width="*">
                                                    <dg:Field.Settings>
                                                        <dg:FieldSettings LabelClickAction="SortByOneFieldOnly" />
                                                    </dg:Field.Settings>
                                                </dg:Field>
                                                <dg:Field Name="MinPercentageBad" Label="Min Percentage Bad (%)" Width="*">
                                                    <dg:Field.Settings>
                                                        <dg:FieldSettings LabelClickAction="SortByOneFieldOnly" />
                                                    </dg:Field.Settings>
                                                </dg:Field>
                                                <dg:Field Visibility="Collapsed" Name="CreatedBy" Label="Created By" />
                                                <dg:Field Visibility="Collapsed" Name="CreatedDate" Label="Created Date" />
                                                <dg:Field Visibility="Collapsed" Name="LastUpdatedBy" Label="Last Updated By" />
                                                <dg:Field Visibility="Collapsed" Name="LastUpdatedDate" Label="Last Updated Date" />
                                            </dg:FieldLayout>
                                        </dg:XamDataPresenter.FieldLayouts>
                                    </dg:XamDataPresenter>
                                </igWindows:TabItemEx>

                                <igWindows:TabItemEx Header="{Binding ApplicationTabHeader}" Style="{StaticResource TabItemExStyle}">
                                    <dg:XamDataPresenter DataSource="{Binding Path=LaunchApplications}" ActiveDataItem="{Binding SelectedObject}" Style="{StaticResource XamDataPresenterStyle}">
                                        <dg:XamDataPresenter.FieldSettings>
                                            <dg:FieldSettings AllowEdit="False" AllowRecordFiltering="True" LabelClickAction="Nothing" />
                                        </dg:XamDataPresenter.FieldSettings>
                                        <dg:XamDataPresenter.FieldLayoutSettings>
                                            <dg:FieldLayoutSettings HeaderPrefixAreaDisplayMode="FieldChooserButton" AutoGenerateFields="False" />
                                        </dg:XamDataPresenter.FieldLayoutSettings>
                                        <dg:XamDataPresenter.FieldLayouts>
                                            <dg:FieldLayout>
                                                <dg:Field Name="Description" Label="Description" Width="*">
                                                    <dg:Field.Settings>
                                                        <dg:FieldSettings LabelClickAction="SortByOneFieldOnly" />
                                                    </dg:Field.Settings>
                                                </dg:Field>
                                                <dg:Field Name="Application" Label="Application" Width="*">
                                                    <dg:Field.Settings>
                                                        <dg:FieldSettings LabelClickAction="SortByOneFieldOnly" />
                                                    </dg:Field.Settings>
                                                </dg:Field>
                                                <dg:Field Name="Arguments" Label="Arguments" Width="*">
                                                    <dg:Field.Settings>
                                                        <dg:FieldSettings LabelClickAction="SortByOneFieldOnly" />
                                                    </dg:Field.Settings>
                                                </dg:Field>
                                                <dg:Field Name="Enabled" Label="Enabled">
                                                    <dg:Field.Settings>
                                                        <dg:FieldSettings CellValuePresenterStyle="{StaticResource CheckBoxStyleGrid}" />
                                                    </dg:Field.Settings>
                                                </dg:Field>
                                                <dg:Field Visibility="Collapsed" Name="CreatedBy" Label="Created By" />
                                                <dg:Field Visibility="Collapsed" Name="CreatedDate" Label="Created Date" />
                                                <dg:Field Visibility="Collapsed" Name="LastUpdatedBy" Label="Last Updated By" />
                                                <dg:Field Visibility="Collapsed" Name="LastUpdatedDate" Label="Last Updated Date" />
                                            </dg:FieldLayout>
                                        </dg:XamDataPresenter.FieldLayouts>
                                    </dg:XamDataPresenter>
                                </igWindows:TabItemEx>

                                <igWindows:TabItemEx Header="{Binding ProductionPlanTabHeader}" Style="{StaticResource TabItemExStyle}">
                                    <Grid>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto" />
                                            <RowDefinition Height="5" />
                                            <RowDefinition Height="*" />
                                        </Grid.RowDefinitions>
                                        <Grid Grid.Row="0">
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="Auto" />
                                                <ColumnDefinition Width="130" />
                                                <ColumnDefinition Width="Auto" />
                                                <ColumnDefinition Width="130" />
                                            </Grid.ColumnDefinitions>
                                            <TextBlock Grid.Column="0" Style="{StaticResource CenterAlignTextBlockStyle}" Text="Due Date From: "/>
                                            <TextBlock Grid.Column="2" Style="{StaticResource CenterAlignTextBlockStyle}" Text="To: "/>
                                            <ig:XamDateTimeInput Grid.Column="1" DisplayMode="IncludeBoth" Mask="{}{date}" InvalidValueBehavior="RevertValue"
                                                    Value="{Binding StartDate, Mode=TwoWay, ValidatesOnDataErrors= True, NotifyOnValidationError=True}">
                                                <ig:XamDateTimeInput.ValueConstraint>
                                                    <ig:ValueConstraint MaxInclusive="{Binding EndDate}"/>
                                                </ig:XamDateTimeInput.ValueConstraint>
                                            </ig:XamDateTimeInput>

                                            <ig:XamDateTimeInput Grid.Column="3" DisplayMode="IncludeBoth" Mask="{}{date}" InvalidValueBehavior="RevertValue"
                                                    Value="{Binding EndDate, Mode=TwoWay, ValidatesOnDataErrors= True, NotifyOnValidationError=True}" >
                                                <ig:XamDateTimeInput.ValueConstraint>
                                                    <ig:ValueConstraint MinInclusive="{Binding StartDate}"/>
                                                </ig:XamDateTimeInput.ValueConstraint>
                                            </ig:XamDateTimeInput>
                                        </Grid>
                                        <dg:XamDataPresenter Grid.Row="2" DataSource="{Binding Path=FilteredProductionPlans}" ActiveDataItem="{Binding SelectedObject}" Style="{StaticResource XamDataPresenterStyle}">
                                            <dg:XamDataPresenter.FieldSettings>
                                                <dg:FieldSettings AllowEdit="False" AllowRecordFiltering="True" LabelClickAction="Nothing" />
                                            </dg:XamDataPresenter.FieldSettings>
                                            <dg:XamDataPresenter.FieldLayoutSettings>
                                                <dg:FieldLayoutSettings HeaderPrefixAreaDisplayMode="FieldChooserButton" AutoGenerateFields="False" />
                                            </dg:XamDataPresenter.FieldLayoutSettings>
                                            <dg:XamDataPresenter.FieldLayouts>
                                                <dg:FieldLayout>
                                                    <dg:Field Name="CellDescription" Label="Cell" Width="*">
                                                        <dg:Field.Settings>
                                                            <dg:FieldSettings LabelClickAction="SortByOneFieldOnly" />
                                                        </dg:Field.Settings>
                                                    </dg:Field>
                                                    <dg:Field Name="WorkOrder" Label="Work Order" Width="*">
                                                        <dg:Field.Settings>
                                                            <dg:FieldSettings LabelClickAction="SortByOneFieldOnly" />
                                                        </dg:Field.Settings>
                                                    </dg:Field>
                                                    <dg:Field Name="ProductSku" Label="Product" Width="*">
                                                        <dg:Field.Settings>
                                                            <dg:FieldSettings LabelClickAction="SortByOneFieldOnly" />
                                                        </dg:Field.Settings>
                                                    </dg:Field>
                                                    <dg:Field Name="DueDate" Label="Due Date" Width="*">
                                                        <dg:Field.Settings>
                                                            <dg:FieldSettings LabelClickAction="SortByOneFieldOnly" />
                                                        </dg:Field.Settings>
                                                    </dg:Field>
                                                    <dg:Field Name="Planned" Label="Planned" Width="*">
                                                        <dg:Field.Settings>
                                                            <dg:FieldSettings LabelClickAction="SortByOneFieldOnly" />
                                                        </dg:Field.Settings>
                                                    </dg:Field>
                                                    <dg:Field Name="Actual" Label="Actual" Width="*">
                                                        <dg:Field.Settings>
                                                            <dg:FieldSettings LabelClickAction="SortByOneFieldOnly" />
                                                        </dg:Field.Settings>
                                                    </dg:Field>
                                                    <dg:Field Name="Closed" Label="Closed">
                                                        <dg:Field.Settings>
                                                            <dg:FieldSettings CellValuePresenterStyle="{StaticResource CheckBoxStyleGrid}" />
                                                        </dg:Field.Settings>
                                                    </dg:Field>
                                                    <dg:Field Name="Enabled" Label="Enabled" Visibility="Collapsed">
                                                        <dg:Field.Settings>
                                                            <dg:FieldSettings CellValuePresenterStyle="{StaticResource CheckBoxStyleGrid}" />
                                                        </dg:Field.Settings>
                                                    </dg:Field>
                                                    <dg:Field Name="SortOrder" Label="SortOrder" Visibility="Collapsed">
                                                        <dg:Field.Settings>
                                                            <dg:FieldSettings LabelClickAction="SortByOneFieldOnly" />
                                                        </dg:Field.Settings>
                                                    </dg:Field>
                                                    <dg:Field Name="BraiderProductDescription" Label="Braider Product" Visibility="Collapsed">
                                                        <dg:Field.Settings>
                                                            <dg:FieldSettings LabelClickAction="SortByOneFieldOnly" />
                                                        </dg:Field.Settings>
                                                    </dg:Field>
                                                    <dg:Field Visibility="Collapsed" Name="CreatedBy" Label="Created By" />
                                                    <dg:Field Visibility="Collapsed" Name="CreatedDate" Label="Created Date" />
                                                    <dg:Field Visibility="Collapsed" Name="LastUpdatedBy" Label="Last Updated By" />
                                                    <dg:Field Visibility="Collapsed" Name="LastUpdatedDate" Label="Last Updated Date" />
                                                </dg:FieldLayout>
                                            </dg:XamDataPresenter.FieldLayouts>
                                        </dg:XamDataPresenter>
                                    </Grid>
                                </igWindows:TabItemEx>

                                <igWindows:TabItemEx Header="{Binding ScheduledDowntimeTabHeader}" Style="{StaticResource TabItemExStyle}"   >
                                    <ig:XamMonthView x:Name="MonthViewScheduledDowntime"  MouseLeftButtonDown="MonthViewScheduledDowntime_OnMouseLeftButtonDown">
                                        
                                        <ig:XamMonthView.DataManager>
                                            <ig:XamScheduleDataManager CurrentUserId="defaultUser" Name="XamScheduleDataManager"
                                                                        ActivityAdded="XamScheduleDataManager1ActivityAdded" 
                                                                        ActivityChanged="XamScheduleDataManager1ActivityChanged"
                                                                        ActivityRemoved="XamScheduleDataManager1ActivityRemoved"
                                                                       ActivityChanging="XamScheduleDataManager_OnActivityChanging"
                                                                       ActivityDialogDisplaying="XamScheduleDataManager_OnActivityDialogDisplaying"
                                                                       >
                                                <ig:XamScheduleDataManager.Settings>
                                                    <ig:ScheduleSettings AllowCalendarClosing="False">
                                                        <ig:ScheduleSettings.AppointmentSettings >
                                                            <ig:AppointmentSettings AllowEdit="False" IsAddViaClickToAddEnabled="False">
                                                            </ig:AppointmentSettings>
                                                        </ig:ScheduleSettings.AppointmentSettings>
                                                        <!--<ig:ScheduleSettings.JournalSettings>
                                                            <ig:JournalSettings
                                                                    AllowAdd="False"
                                                                    AllowRemove="False"
                                                                    AllowEdit="False" />
                                                        </ig:ScheduleSettings.JournalSettings>
                                                        <ig:ScheduleSettings.TaskSettings>
                                                            <ig:TaskSettings
                                                                AllowRemove="False"
                                                                AllowTimeZoneNeutral="False"
                                                                AllowRecurring="False" 
                                                                AllowEdit="False" 
                                                                AllowAdd="False"/>
                                                        </ig:ScheduleSettings.TaskSettings>-->
                                                    </ig:ScheduleSettings>
                                                </ig:XamScheduleDataManager.Settings>
                                                <ig:XamScheduleDataManager.CalendarGroups>
                                                    <ig:CalendarGroup InitialCalendarIds="defaultUser"/>
                                                </ig:XamScheduleDataManager.CalendarGroups>
                                                <!--<ig:XamScheduleDataManager.DataConnector  >
                                                    <ig:ListScheduleDataConnector
                                                        ResourceItemsSource="{Binding ScheduleResources}"
                                                        ResourceCalendarItemsSource="{Binding ScheduleResourceCalendars}"
                                                        AppointmentItemsSource="{Binding ScheduledDowntimes}"
                                                          
                                                        />
                                                </ig:XamScheduleDataManager.DataConnector>-->

                                                <ig:XamScheduleDataManager.DataConnector  >
                                                    <ig:ListScheduleDataConnector  Name="listScheduleDataConnector1"
                                                        ResourceItemsSource="{Binding ScheduleResources}"
                                                        ResourceCalendarItemsSource="{Binding ScheduleResourceCalendars}"
                                                        AppointmentItemsSource="{Binding ScheduledDowntimes}" 
                                                        >
                                                        <ig:ListScheduleDataConnector.TimeZoneInfoProvider>
                                                            <ig:OSTimeZoneInfoProvider  LocalTimeZoneId="UTC"  />
                                                        </ig:ListScheduleDataConnector.TimeZoneInfoProvider>
                                                        <ig:ListScheduleDataConnector.ResourcePropertyMappings>
                                                            <ig:ResourcePropertyMappingCollection UseDefaultMappings="True"/>
                                                        </ig:ListScheduleDataConnector.ResourcePropertyMappings>
                                                        <ig:ListScheduleDataConnector.ResourceCalendarPropertyMappings>
                                                            <ig:ResourceCalendarPropertyMappingCollection UseDefaultMappings="True"/>
                                                        </ig:ListScheduleDataConnector.ResourceCalendarPropertyMappings>
                                                        <ig:ListScheduleDataConnector.AppointmentPropertyMappings>
                                                            <ig:AppointmentPropertyMappingCollection UseDefaultMappings="True"/>
                                                        </ig:ListScheduleDataConnector.AppointmentPropertyMappings>

                                                    </ig:ListScheduleDataConnector>

                                                </ig:XamScheduleDataManager.DataConnector>

                                            </ig:XamScheduleDataManager>


                                        </ig:XamMonthView.DataManager>
                                    </ig:XamMonthView>
                                </igWindows:TabItemEx>


                            </igWindows:XamTabControl>
                        </Grid>
                    </Grid>

                    <!--Footer-->
                    <ContentControl Grid.Row=" 2" Template="{StaticResource FooterTemplate}" />
                </Grid>
            </igDock:ContentPane>
            <igDock:XamDockManager.Panes>
                <igDock:SplitPane igDock:XamDockManager.InitialLocation="DockedRight" Width="325" SplitterOrientation="Horizontal">
                    <igDock:ContentPane Header="{Binding ContentPaneHeader}" Style="{StaticResource RightPaneStyle}">
                        <Grid>
                            <!--AreaShift properties-->
                            <Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Visibility="{Binding CloneSelectedAreaShift, Converter={StaticResource ObjectNullVisibilityConverter}}">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="*" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>

                                <ig:XamPropertyGrid Grid.Row="0"  SelectedObject="{Binding CloneSelectedAreaShift}" ScrollBarVisibility="Auto" FilterAreaVisibility="Collapsed" >
                                    <ig:XamPropertyGrid.ItemFilters>
                                        <ig:PropertyGridConditionGroup LogicalOperator="Or" >
                                            <ig:PropertyGridComparisonCondition  Operator="Equals"  OperandSource="CategoryName" Value="Properties" ></ig:PropertyGridComparisonCondition>
                                            <ig:PropertyGridComparisonCondition  Operator="Equals"  OperandSource="CategoryName" Value="Update History" ></ig:PropertyGridComparisonCondition>
                                        </ig:PropertyGridConditionGroup>
                                    </ig:XamPropertyGrid.ItemFilters>
                                    <ig:XamPropertyGrid.EditorDefinitions>
                                        <ig:PropertyGridEditorDefinition Category="Properties">
                                            <ig:PropertyGridEditorDefinition.TargetProperties>
                                                <system:String>StartTime</system:String>
                                                <system:String>EndTime</system:String>
                                            </ig:PropertyGridEditorDefinition.TargetProperties>
                                            <ig:PropertyGridEditorDefinition.EditTemplate>
                                                <DataTemplate>
                                                    <ig:XamDateTimeInput DisplayMode="IncludeBoth" Mask="{}{time}" InvalidValueBehavior="RevertValue"
                                            vuc:ValidationSummaryValidator.AdornerSite="{Binding ElementName=vs1}"
                                            Value="{Binding Value, Mode=TwoWay, ValidatesOnDataErrors= True, NotifyOnValidationError=True}" />
                                                </DataTemplate>
                                            </ig:PropertyGridEditorDefinition.EditTemplate>
                                        </ig:PropertyGridEditorDefinition>

                                        <ig:PropertyGridEditorDefinition Category="Update History">
                                            <ig:PropertyGridEditorDefinition.EditTemplate>
                                                <DataTemplate>
                                                    <TextBlock Text ="{Binding Value}" Style="{StaticResource PropertyDataTextBlockStyle}"/>
                                                </DataTemplate>
                                            </ig:PropertyGridEditorDefinition.EditTemplate>
                                        </ig:PropertyGridEditorDefinition>
                                    </ig:XamPropertyGrid.EditorDefinitions>
                                </ig:XamPropertyGrid>

                                <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center">
                                    <Button Style="{StaticResource PropertyButtonStyle}" Content="Save" Command="{Binding SaveAreaShiftCommand}"
                                                IsEnabled="{Binding CloneSelectedAreaShift.IsChange}" />
                                    <Button Style="{StaticResource PropertyButtonStyle}" Content="Cancel" Command="{Binding CancelAreaShiftCommand}"
                                                IsEnabled="{Binding CloneSelectedAreaShift.IsCancelEnable}" />
                                    <Button Style="{StaticResource PropertyButtonStyle}" Content="Delete" Command="{Binding DeleteAreaShiftCommand}"
                                                Visibility="{Binding CloneSelectedAreaShift.IsAddNew,Converter={StaticResource InvertBooleanVisibilityConverter},ConverterParameter=Collapsed}" />
                                </StackPanel>

                                <StackPanel Grid.Row="2">
                                    <vuc:ValidationSummary x:Name="vs1" />
                                    <TextBlock Text="{Binding CloneSelectedAreaShift.ErrorMessage}" Style="{StaticResource ErrorTextBlockStyle}" />
                                </StackPanel>
                            </Grid>

                            <!--Rollup Definition properties-->
                            <Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
                                        Visibility ="{Binding CloneSelectedRollupDefinition, Converter={StaticResource ObjectNullVisibilityConverter}}">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="*" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>

                                <ig:XamPropertyGrid Grid.Row="0"  SelectedObject="{Binding CloneSelectedRollupDefinition}" ScrollBarVisibility="Auto" FilterAreaVisibility="Collapsed" >
                                    <ig:XamPropertyGrid.ItemFilters>
                                        <ig:PropertyGridConditionGroup LogicalOperator="Or" >
                                            <ig:PropertyGridComparisonCondition  Operator="Equals"  OperandSource="CategoryName" Value="Properties" ></ig:PropertyGridComparisonCondition>
                                            <ig:PropertyGridComparisonCondition  Operator="Equals"  OperandSource="CategoryName" Value="Update History" ></ig:PropertyGridComparisonCondition>
                                        </ig:PropertyGridConditionGroup>
                                    </ig:XamPropertyGrid.ItemFilters>
                                    <ig:XamPropertyGrid.EditorDefinitions>
                                        <ig:PropertyGridEditorDefinition Category="Update History">
                                            <ig:PropertyGridEditorDefinition.EditTemplate>
                                                <DataTemplate>
                                                    <TextBlock Text ="{Binding Value}" Style="{StaticResource PropertyDataTextBlockStyle}"/>
                                                </DataTemplate>
                                            </ig:PropertyGridEditorDefinition.EditTemplate>
                                        </ig:PropertyGridEditorDefinition>
                                    </ig:XamPropertyGrid.EditorDefinitions>
                                </ig:XamPropertyGrid>

                                <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center">
                                    <Button Style="{StaticResource PropertyButtonStyle}" Content="Save" Command="{Binding SaveRollupDefCommand}"
                                                IsEnabled="{Binding CloneSelectedRollupDefinition.IsChange}" />
                                    <Button Style="{StaticResource PropertyButtonStyle}" Content="Cancel" Command="{Binding CancelRollupDefCommand}"
                                                IsEnabled="{Binding CloneSelectedRollupDefinition.IsCancelEnable}" />
                                    <Button Style="{StaticResource PropertyButtonStyle}" Content="Delete" Command="{Binding DeleteRollupDefCommand}"
                                                Visibility="{Binding CloneSelectedRollupDefinition.IsAddNew,Converter={StaticResource InvertBooleanVisibilityConverter},ConverterParameter=Collapsed}" />
                                </StackPanel>

                                <StackPanel Grid.Row="2">
                                    <vuc:ValidationSummary x:Name="vs4" />
                                    <TextBlock Text="{Binding CloneSelectedRollupDefinition.ErrorMessage}" Style="{StaticResource ErrorTextBlockStyle}" />
                                </StackPanel>
                            </Grid>

                            <!--LaunchApplication properties-->
                            <Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
                                        Visibility="{Binding CloneSelectedLaunchApplication, Converter={StaticResource ObjectNullVisibilityConverter}}">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="*" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>

                                <ig:XamPropertyGrid Grid.Row="0"  SelectedObject="{Binding CloneSelectedLaunchApplication}" ScrollBarVisibility="Auto" FilterAreaVisibility="Collapsed" >
                                    <ig:XamPropertyGrid.ItemFilters>
                                        <ig:PropertyGridConditionGroup LogicalOperator="Or" >
                                            <ig:PropertyGridComparisonCondition  Operator="Equals"  OperandSource="CategoryName" Value="Properties" ></ig:PropertyGridComparisonCondition>
                                            <ig:PropertyGridComparisonCondition  Operator="Equals"  OperandSource="CategoryName" Value="Update History" ></ig:PropertyGridComparisonCondition>
                                        </ig:PropertyGridConditionGroup>
                                    </ig:XamPropertyGrid.ItemFilters>
                                    <ig:XamPropertyGrid.EditorDefinitions>
                                        <ig:PropertyGridEditorDefinition Category="Update History">
                                            <ig:PropertyGridEditorDefinition.EditTemplate>
                                                <DataTemplate>
                                                    <TextBlock Text ="{Binding Value}" Style="{StaticResource PropertyDataTextBlockStyle}"/>
                                                </DataTemplate>
                                            </ig:PropertyGridEditorDefinition.EditTemplate>
                                        </ig:PropertyGridEditorDefinition>
                                    </ig:XamPropertyGrid.EditorDefinitions>
                                </ig:XamPropertyGrid>

                                <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center">
                                    <Button Style="{StaticResource PropertyButtonStyle}" Content="Save" Command="{Binding SaveLaunchApplicationCommand}"
                                                IsEnabled="{Binding CloneSelectedLaunchApplication.IsChange}" />
                                    <Button Style="{StaticResource PropertyButtonStyle}" Content="Cancel" Command="{Binding CancelLaunchApplicationCommand}"
                                                IsEnabled="{Binding CloneSelectedLaunchApplication.IsCancelEnable}" />
                                    <Button Style="{StaticResource PropertyButtonStyle}" Content="Delete" Command="{Binding DeleteLaunchApplicationCommand}"
                                                Visibility="{Binding CloneSelectedLaunchApplication.IsAddNew,Converter={StaticResource InvertBooleanVisibilityConverter},ConverterParameter=Collapsed}" />
                                </StackPanel>

                                <StackPanel Grid.Row="2">
                                    <vuc:ValidationSummary x:Name="vs2" />
                                    <TextBlock Text="{Binding CloneSelectedLaunchApplication.ErrorMessage}" Style="{StaticResource ErrorTextBlockStyle}" />
                                </StackPanel>
                            </Grid>

                            <!--ReasonCode properties-->
                            <Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Visibility="{Binding CloneSelectedReasonCode, Converter={StaticResource ObjectNullVisibilityConverter}}">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="*" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <ig:XamPropertyGrid Grid.Row="0"  SelectedObject="{Binding CloneSelectedReasonCode}" ScrollBarVisibility="Auto" FilterAreaVisibility="Collapsed" >
                                    <ig:XamPropertyGrid.ItemFilters>
                                        <ig:PropertyGridConditionGroup LogicalOperator="Or" >
                                            <ig:PropertyGridComparisonCondition  Operator="Equals"  OperandSource="CategoryName" Value="Properties" ></ig:PropertyGridComparisonCondition>
                                            <ig:PropertyGridComparisonCondition  Operator="Equals"  OperandSource="CategoryName" Value="Update History" ></ig:PropertyGridComparisonCondition>
                                        </ig:PropertyGridConditionGroup>
                                    </ig:XamPropertyGrid.ItemFilters>
                                    <ig:XamPropertyGrid.EditorDefinitions>
                                        <ig:PropertyGridEditorDefinition Category="Properties">
                                            <ig:PropertyGridEditorDefinition.TargetProperties>
                                                <system:String>ParentId</system:String>
                                            </ig:PropertyGridEditorDefinition.TargetProperties>
                                            <ig:PropertyGridEditorDefinition.EditTemplate>
                                                <DataTemplate>
                                                    <Grid>
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="*" />
                                                            <ColumnDefinition Width="Auto" />
                                                        </Grid.ColumnDefinitions>
                                                        <Grid.RowDefinitions>
                                                            <RowDefinition Height="Auto" />
                                                            <RowDefinition Height="Auto" />
                                                        </Grid.RowDefinitions>
                                                        <Border Grid.RowSpan="2" Grid.ColumnSpan="2" BorderThickness="1" BorderBrush="{StaticResource LightGrayColor}" />

                                                        <TextBox Grid.Row="0" Grid.Column="0" Style="{StaticResource PropertyTextBoxStyle}" IsReadOnly="True"
                                                                Text="{Binding Source={StaticResource AreaDetailsViewModel}, Path= CloneSelectedReasonCode.Parent,Converter={StaticResource ReasonCodeToTextConverter}}" />
                                                        <Button Grid.Row="0" Grid.Column="1" x:Name="ReasonCodeBtn" Command="{Binding Source={StaticResource AreaDetailsViewModel}, Path=ParentReasonTreeClickCommand}" Style="{StaticResource PropertyButtonStyle}" Margin="0" Content="{Binding Source={StaticResource AreaDetailsViewModel}, Path=ParentReasonTreeButtonContent}" />

                                                        <ig:XamDataTree Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" x:Name="ParentReasonCodeTreeView" Visibility="{Binding Source={StaticResource AreaDetailsViewModel}, Path=ParentReasonTreeVisibility}"
                                                                ItemsSource="{Binding Source={StaticResource AreaDetailsViewModel}, Path=ReasonCodesSourceList}" Height="250" ActiveDataItem="{Binding Source={StaticResource AreaDetailsViewModel}, Path= CloneSelectedReasonCode.Parent, Mode=TwoWay}" >
                                                            <ig:XamDataTree.GlobalNodeLayouts>
                                                                <ig:NodeLayout Key="ReasonCodeId" TargetTypeName="ReasonCodeModel" DisplayMemberPath="Description" />
                                                            </ig:XamDataTree.GlobalNodeLayouts>
                                                            <!--                                                                <ig:XamDataTree.SelectedDataItems/>-->
                                                        </ig:XamDataTree>

                                                    </Grid>
                                                </DataTemplate>
                                            </ig:PropertyGridEditorDefinition.EditTemplate>
                                        </ig:PropertyGridEditorDefinition>

                                        <ig:PropertyGridEditorDefinition Category="Properties">
                                            <ig:PropertyGridEditorDefinition.TargetProperties>
                                                <system:String>LinkId</system:String>
                                            </ig:PropertyGridEditorDefinition.TargetProperties>
                                            <ig:PropertyGridEditorDefinition.EditTemplate>
                                                <DataTemplate>
                                                    <Grid>
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="*" />
                                                            <ColumnDefinition Width="Auto" />
                                                        </Grid.ColumnDefinitions>
                                                        <Grid.RowDefinitions>
                                                            <RowDefinition Height="Auto" />
                                                            <RowDefinition Height="Auto" />
                                                        </Grid.RowDefinitions>
                                                        <Border Grid.RowSpan="2" Grid.ColumnSpan="2" BorderThickness="1" BorderBrush="{StaticResource LightGrayColor}" />

                                                        <TextBox Grid.Row="0" Grid.Column="0" Style="{StaticResource PropertyTextBoxStyle}" IsReadOnly="True"
                                                Text="{Binding Source={StaticResource AreaDetailsViewModel}, Path= CloneSelectedReasonCode.Link,Converter={StaticResource ReasonCodeToTextConverter}}" />
                                                        <Button Grid.Row="0" Grid.Column="1" x:Name="ReasonCodeBtn" Command="{Binding Source={StaticResource AreaDetailsViewModel}, Path=LinkReasonTreeClickCommand}" Style="{StaticResource PropertyButtonStyle}" Margin="0" Content="{Binding Source={StaticResource AreaDetailsViewModel}, Path=LinkReasonTreeButtonContent}" />

                                                        <ig:XamDataTree Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" x:Name="LinkReasonCodeTreeView" Visibility="{Binding Source={StaticResource AreaDetailsViewModel}, Path=LinkReasonTreeVisibility}"
                                                ItemsSource="{Binding Source={StaticResource AreaDetailsViewModel}, Path=ReasonCodesSourceList}" Height="250" ActiveDataItem="{Binding Source={StaticResource AreaDetailsViewModel}, Path= CloneSelectedReasonCode.Link, Mode=TwoWay}">
                                                            <ig:XamDataTree.GlobalNodeLayouts>
                                                                <ig:NodeLayout Key="ReasonCodeId" TargetTypeName="ReasonCodeModel" DisplayMemberPath="Description"  />
                                                            </ig:XamDataTree.GlobalNodeLayouts>
                                                            <!--<ig:XamDataTree.SelectedDataItems/>-->
                                                        </ig:XamDataTree>

                                                    </Grid>
                                                </DataTemplate>
                                            </ig:PropertyGridEditorDefinition.EditTemplate>
                                        </ig:PropertyGridEditorDefinition>

                                        <ig:PropertyGridEditorDefinition Category="Properties">
                                            <ig:PropertyGridEditorDefinition.TargetProperties>
                                                <system:String>RollupDefinitionId</system:String>
                                            </ig:PropertyGridEditorDefinition.TargetProperties>
                                            <ig:PropertyGridEditorDefinition.EditTemplate>
                                                <DataTemplate>
                                                    <ComboBox x:Name="comboBox"
                                                            ItemsSource="{Binding Source={StaticResource AreaDetailsViewModel}, Path=RollupDefinitionsSourceList}"
                                                            DisplayMemberPath="Description"
                                                            SelectedValuePath="RollupDefinitionId"                                       
                                                        >
                                                        <ComboBox.SelectedItem>
                                                            <MultiBinding Converter="{StaticResource SelectedValuesConverter}" >
                                                                <Binding Path="Value" Mode="TwoWay"/>
                                                                <Binding Path="RollupDefinitionsSourceList" Source="{StaticResource AreaDetailsViewModel}" Mode="OneWay"/>
                                                            </MultiBinding>
                                                        </ComboBox.SelectedItem>
                                                    </ComboBox>
                                                </DataTemplate>
                                            </ig:PropertyGridEditorDefinition.EditTemplate>
                                        </ig:PropertyGridEditorDefinition>
                                        <ig:PropertyGridEditorDefinition Category="Update History">
                                            <ig:PropertyGridEditorDefinition.EditTemplate>
                                                <DataTemplate>
                                                    <TextBlock Text ="{Binding Value}" Style="{StaticResource PropertyDataTextBlockStyle}"/>
                                                </DataTemplate>
                                            </ig:PropertyGridEditorDefinition.EditTemplate>
                                        </ig:PropertyGridEditorDefinition>
                                    </ig:XamPropertyGrid.EditorDefinitions>
                                </ig:XamPropertyGrid>
                                <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center">
                                    <Button Style="{StaticResource PropertyButtonStyle}" Content="Save" Command="{Binding SaveReasonCodeCommand}"
                                                IsEnabled="{Binding CloneSelectedReasonCode.IsChange}" />
                                    <Button Style="{StaticResource PropertyButtonStyle}" Content="Cancel" Command="{Binding CancelReasonCodeCommand}"
                                                IsEnabled="{Binding CloneSelectedReasonCode.IsCancelEnable}" />
                                    <Button Style="{StaticResource PropertyButtonStyle}" Content="Delete" Command="{Binding DeleteReasonCodeCommand}"
                                                Visibility="{Binding CloneSelectedReasonCode.IsAddNew,Converter={StaticResource InvertBooleanVisibilityConverter},ConverterParameter=Collapsed}" />
                                </StackPanel>
                                <StackPanel Grid.Row="2">
                                    <vuc:ValidationSummary x:Name="vs3" />
                                    <TextBlock Text="{Binding CloneSelectedReasonCode.ErrorMessage}" Style="{StaticResource ErrorTextBlockStyle}" />
                                </StackPanel>
                            </Grid>

                            <!--ScrapReasonCode properties-->
                            <Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Visibility="{Binding CloneSelectedScrapReasonCode, Converter={StaticResource ObjectNullVisibilityConverter}}">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="*" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <ig:XamPropertyGrid Grid.Row="0"  SelectedObject="{Binding CloneSelectedScrapReasonCode}" ScrollBarVisibility="Auto" FilterAreaVisibility="Collapsed" >
                                    <ig:XamPropertyGrid.PropertyGenerator>
                                        <ig:ReflectionPropertyGenerator>
                                            <ig:ReflectionPropertyGenerator.GeneratedPropertyFilter>
                                                <ig:PropertyGridConditionGroup LogicalOperator="And">
                                                    <ig:PropertyGridComparisonCondition Operator="DoesNotContain" Value="FlashDelay"/>
                                                    <ig:PropertyGridComparisonCondition Operator="DoesNotContain" Value="IgnoreInOeeCalc"/>
                                                    <ig:PropertyGridComparisonCondition Operator="DoesNotContain" Value="IgnoreInWaitingCalc"/>
                                                    <ig:PropertyGridComparisonCondition Operator="DoesNotContain" Value="HideChildren"/>
                                                    <ig:PropertyGridComparisonCondition Operator="DoesNotContain" Value="DisplayInDowntimeChart"/>
                                                    <ig:PropertyGridComparisonCondition Operator="DoesNotContain" Value="RollupDefinitionDescription"/>
                                                    <ig:PropertyGridComparisonCondition Operator="DoesNotContain" Value="RollupDefinitionId"/>
                                                    <ig:PropertyGridComparisonCondition Operator="DoesNotContain" Value="IgnoreVisiBoxEvents"/>
                                                    <ig:PropertyGridComparisonCondition Operator="DoesNotContain" Value="ShopClockEvent"/>
                                                </ig:PropertyGridConditionGroup>
                                            </ig:ReflectionPropertyGenerator.GeneratedPropertyFilter>
                                        </ig:ReflectionPropertyGenerator>
                                    </ig:XamPropertyGrid.PropertyGenerator>
                                    <ig:XamPropertyGrid.ItemFilters>
                                        <ig:PropertyGridConditionGroup LogicalOperator="Or" >
                                            <ig:PropertyGridComparisonCondition  Operator="Equals"  OperandSource="CategoryName" Value="Properties" ></ig:PropertyGridComparisonCondition>
                                            <ig:PropertyGridComparisonCondition  Operator="Equals"  OperandSource="CategoryName" Value="Update History" ></ig:PropertyGridComparisonCondition>
                                        </ig:PropertyGridConditionGroup>
                                    </ig:XamPropertyGrid.ItemFilters>
                                    <ig:XamPropertyGrid.EditorDefinitions>
                                        <ig:PropertyGridEditorDefinition Category="Properties">
                                            <ig:PropertyGridEditorDefinition.TargetProperties>
                                                <system:String>ParentId</system:String>
                                            </ig:PropertyGridEditorDefinition.TargetProperties>
                                            <ig:PropertyGridEditorDefinition.EditTemplate>
                                                <DataTemplate>
                                                    <Grid>
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="*" />
                                                            <ColumnDefinition Width="Auto" />
                                                        </Grid.ColumnDefinitions>
                                                        <Grid.RowDefinitions>
                                                            <RowDefinition Height="Auto" />
                                                            <RowDefinition Height="Auto" />
                                                        </Grid.RowDefinitions>
                                                        <Border Grid.RowSpan="2" Grid.ColumnSpan="2" BorderThickness="1" BorderBrush="{StaticResource LightGrayColor}" />

                                                        <TextBox Grid.Row="0" Grid.Column="0" Style="{StaticResource PropertyTextBoxStyle}" IsReadOnly="True"
                                                        Text="{Binding Source={StaticResource AreaDetailsViewModel}, Path= CloneSelectedScrapReasonCode.Parent,Converter={StaticResource ReasonCodeToTextConverter}}" />
                                                        <Button Grid.Row="0" Grid.Column="1" x:Name="ScrapReasonCodeBtn" Command="{Binding Source={StaticResource AreaDetailsViewModel}, Path=ParentScrapReasonTreeClickCommand}" Style="{StaticResource PropertyButtonStyle}" Margin="0" Content="{Binding Source={StaticResource AreaDetailsViewModel}, Path=ParentScrapReasonTreeButtonContent}" />

                                                        <ig:XamDataTree Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" x:Name="ParentScrapReasonCodeTreeView" Visibility="{Binding Source={StaticResource AreaDetailsViewModel}, Path=ParentScrapReasonTreeVisibility}"
                                                        ItemsSource="{Binding Source={StaticResource AreaDetailsViewModel}, Path=ScrapReasonCodesSourceList}" Height="250" ActiveDataItem="{Binding Source={StaticResource AreaDetailsViewModel}, Path= CloneSelectedScrapReasonCode.Parent, Mode=TwoWay}" >
                                                            <ig:XamDataTree.GlobalNodeLayouts>
                                                                <ig:NodeLayout Key="ReasonCodeId" TargetTypeName="ReasonCodeModel" DisplayMemberPath="Description" />
                                                            </ig:XamDataTree.GlobalNodeLayouts>
                                                        </ig:XamDataTree>

                                                    </Grid>
                                                </DataTemplate>
                                            </ig:PropertyGridEditorDefinition.EditTemplate>
                                        </ig:PropertyGridEditorDefinition>

                                        <ig:PropertyGridEditorDefinition Category="Properties">
                                            <ig:PropertyGridEditorDefinition.TargetProperties>
                                                <system:String>LinkId</system:String>
                                            </ig:PropertyGridEditorDefinition.TargetProperties>
                                            <ig:PropertyGridEditorDefinition.EditTemplate>
                                                <DataTemplate>
                                                    <Grid>
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="*" />
                                                            <ColumnDefinition Width="Auto" />
                                                        </Grid.ColumnDefinitions>
                                                        <Grid.RowDefinitions>
                                                            <RowDefinition Height="Auto" />
                                                            <RowDefinition Height="Auto" />
                                                        </Grid.RowDefinitions>
                                                        <Border Grid.RowSpan="2" Grid.ColumnSpan="2" BorderThickness="1" BorderBrush="{StaticResource LightGrayColor}" />

                                                        <TextBox Grid.Row="0" Grid.Column="0" Style="{StaticResource PropertyTextBoxStyle}" IsReadOnly="True"
                                                        Text="{Binding Source={StaticResource AreaDetailsViewModel}, Path= CloneSelectedScrapReasonCode.Link,Converter={StaticResource ReasonCodeToTextConverter}}" />
                                                        <Button Grid.Row="0" Grid.Column="1" x:Name="ScrapReasonCodeBtn" Command="{Binding Source={StaticResource AreaDetailsViewModel}, Path=LinkScrapReasonTreeClickCommand}" Style="{StaticResource PropertyButtonStyle}" Margin="0" Content="{Binding Source={StaticResource AreaDetailsViewModel}, Path=LinkScrapReasonTreeButtonContent}" />

                                                        <ig:XamDataTree Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" x:Name="LinkScrapReasonCodeTreeView" Visibility="{Binding Source={StaticResource AreaDetailsViewModel}, Path=LinkScrapReasonTreeVisibility}"
                                                        ItemsSource="{Binding Source={StaticResource AreaDetailsViewModel}, Path=ScrapReasonCodesSourceList}" Height="250" ActiveDataItem="{Binding Source={StaticResource AreaDetailsViewModel}, Path= CloneSelectedScrapReasonCode.Link, Mode=TwoWay}">
                                                            <ig:XamDataTree.GlobalNodeLayouts>
                                                                <ig:NodeLayout Key="ReasonCodeId" TargetTypeName="ReasonCodeModel" DisplayMemberPath="Description"  />
                                                            </ig:XamDataTree.GlobalNodeLayouts>

                                                        </ig:XamDataTree>

                                                    </Grid>
                                                </DataTemplate>
                                            </ig:PropertyGridEditorDefinition.EditTemplate>
                                        </ig:PropertyGridEditorDefinition>
                                        <ig:PropertyGridEditorDefinition Category="Update History">
                                            <ig:PropertyGridEditorDefinition.EditTemplate>
                                                <DataTemplate>
                                                    <TextBlock Text ="{Binding Value}" Style="{StaticResource PropertyDataTextBlockStyle}"/>
                                                </DataTemplate>
                                            </ig:PropertyGridEditorDefinition.EditTemplate>
                                        </ig:PropertyGridEditorDefinition>
                                    </ig:XamPropertyGrid.EditorDefinitions>
                                </ig:XamPropertyGrid>
                                <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center">
                                    <Button Style="{StaticResource PropertyButtonStyle}" Content="Save" Command="{Binding SaveScrapReasonCodeCommand}"
                                                        IsEnabled="{Binding CloneSelectedScrapReasonCode.IsChange}" />
                                    <Button Style="{StaticResource PropertyButtonStyle}" Content="Cancel" Command="{Binding CancelScrapReasonCodeCommand}"
                                                        IsEnabled="{Binding CloneSelectedScrapReasonCode.IsCancelEnable}" />
                                    <Button Style="{StaticResource PropertyButtonStyle}" Content="Delete" Command="{Binding DeleteScrapReasonCodeCommand}"
                                                        Visibility="{Binding CloneSelectedScrapReasonCode.IsAddNew,Converter={StaticResource InvertBooleanVisibilityConverter},ConverterParameter=Collapsed}" />
                                </StackPanel>
                                <StackPanel Grid.Row="2">
                                    <vuc:ValidationSummary x:Name="vs5" />
                                    <TextBlock Text="{Binding CloneSelectedScrapReasonCode.ErrorMessage}" Style="{StaticResource ErrorTextBlockStyle}" />
                                </StackPanel>
                            </Grid>

                            <!--Alarm Setting properties-->
                            <Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
                                        Visibility="{Binding CloneSelectedAlarmSetting, Converter={StaticResource ObjectNullVisibilityConverter}}">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="*" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>

                                <ig:XamPropertyGrid Grid.Row="0"  SelectedObject="{Binding CloneSelectedAlarmSetting}" ScrollBarVisibility="Auto" FilterAreaVisibility="Collapsed" >
                                    <ig:XamPropertyGrid.ItemFilters>
                                        <ig:PropertyGridConditionGroup LogicalOperator="Or" >
                                            <ig:PropertyGridComparisonCondition  Operator="Equals"  OperandSource="CategoryName" Value="Properties" ></ig:PropertyGridComparisonCondition>
                                            <ig:PropertyGridComparisonCondition  Operator="Equals"  OperandSource="CategoryName" Value="Update History" ></ig:PropertyGridComparisonCondition>
                                        </ig:PropertyGridConditionGroup>
                                    </ig:XamPropertyGrid.ItemFilters>
                                    <ig:XamPropertyGrid.EditorDefinitions>
                                        <ig:PropertyGridEditorDefinition Category="Update History">
                                            <ig:PropertyGridEditorDefinition.EditTemplate>
                                                <DataTemplate>
                                                    <TextBlock Text ="{Binding Value}" Style="{StaticResource PropertyDataTextBlockStyle}"/>
                                                </DataTemplate>
                                            </ig:PropertyGridEditorDefinition.EditTemplate>
                                        </ig:PropertyGridEditorDefinition>
                                    </ig:XamPropertyGrid.EditorDefinitions>
                                </ig:XamPropertyGrid>
                                <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center">
                                    <Button Style="{StaticResource PropertyButtonStyle}" Content="Save" Command="{Binding SaveAlarmSettingCommand}"
                                                IsEnabled="{Binding CloneSelectedAlarmSetting.IsChange}" />
                                    <Button Style="{StaticResource PropertyButtonStyle}" Content="Cancel" Command="{Binding CancelAlarmSettingCommand}"
                                                IsEnabled="{Binding CloneSelectedAlarmSetting.IsCancelEnable}" />
                                    <Button Style="{StaticResource PropertyButtonStyle}" Content="Delete" Command="{Binding DeleteAlarmSettingCommand}"
                                                Visibility="{Binding CloneSelectedAlarmSetting.IsAddNew,Converter={StaticResource InvertBooleanVisibilityConverter},ConverterParameter=Collapsed}" />
                                </StackPanel>

                                <StackPanel Grid.Row="2">
                                    <vuc:ValidationSummary x:Name="vs7" />
                                    <TextBlock Text="{Binding CloneSelectedAlarmSetting.ErrorMessage}" Style="{StaticResource ErrorTextBlockStyle}" />
                                </StackPanel>
                            </Grid>

                            <!--Production Plan properties-->
                            <Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
                                        Visibility="{Binding CloneSelectedProductionPlan, Converter={StaticResource ObjectNullVisibilityConverter}}">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="*" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>

                                <ig:XamPropertyGrid Grid.Row="0"  SelectedObject="{Binding CloneSelectedProductionPlan}" ScrollBarVisibility="Auto" FilterAreaVisibility="Collapsed" >
                                    <ig:XamPropertyGrid.ItemFilters>
                                        <ig:PropertyGridConditionGroup LogicalOperator="Or" >
                                            <ig:PropertyGridComparisonCondition  Operator="Equals"  OperandSource="CategoryName" Value="Properties" ></ig:PropertyGridComparisonCondition>
                                            <ig:PropertyGridComparisonCondition  Operator="Equals"  OperandSource="CategoryName" Value="Update History" ></ig:PropertyGridComparisonCondition>
                                        </ig:PropertyGridConditionGroup>
                                    </ig:XamPropertyGrid.ItemFilters>
                                    <ig:XamPropertyGrid.EditorDefinitions>
                                        <ig:PropertyGridEditorDefinition Category="Properties">
                                            <ig:PropertyGridEditorDefinition.TargetProperties>
                                                <system:String>CellId</system:String>
                                            </ig:PropertyGridEditorDefinition.TargetProperties>
                                            <ig:PropertyGridEditorDefinition.EditTemplate>
                                                <DataTemplate>
                                                    <ComboBox 
                                                            ItemsSource="{Binding Source={StaticResource AreaDetailsViewModel}, Path=ProductionPlanReference.Cells}"
                                                            DisplayMemberPath="CellName"
                                                            SelectedValuePath="CellId"                                      
                                                            >
                                                        <ComboBox.SelectedItem>
                                                            <MultiBinding Converter="{StaticResource SelectedValuesConverter}" >
                                                                <Binding Path="Value" Mode="TwoWay"/>
                                                                <Binding Path="ProductionPlanReference.Cells" Source="{StaticResource AreaDetailsViewModel}" Mode="OneWay"/>
                                                            </MultiBinding>
                                                        </ComboBox.SelectedItem>
                                                    </ComboBox>
                                                </DataTemplate>
                                            </ig:PropertyGridEditorDefinition.EditTemplate>
                                        </ig:PropertyGridEditorDefinition>
                                        <ig:PropertyGridEditorDefinition Category="Properties">
                                            <ig:PropertyGridEditorDefinition.TargetProperties>
                                                <system:String>ProductId</system:String>
                                            </ig:PropertyGridEditorDefinition.TargetProperties>
                                            <ig:PropertyGridEditorDefinition.EditTemplate>
                                                <DataTemplate>
                                                    <ComboBox
                                                            ItemsSource="{Binding Source={StaticResource AreaDetailsViewModel}, Path=ProductionPlanReference.Products}"
                                                            DisplayMemberPath="Sku"
                                                            SelectedValuePath="ProductId"                                       
                                                        >
                                                        <ComboBox.SelectedItem>
                                                            <MultiBinding Converter="{StaticResource SelectedValuesConverter}" >
                                                                <Binding Path="Value" Mode="TwoWay"/>
                                                                <Binding Path="ProductionPlanReference.Products" Source="{StaticResource AreaDetailsViewModel}" Mode="OneWay"/>
                                                            </MultiBinding>
                                                        </ComboBox.SelectedItem>
                                                    </ComboBox>
                                                </DataTemplate>
                                            </ig:PropertyGridEditorDefinition.EditTemplate>
                                        </ig:PropertyGridEditorDefinition>
                                        <ig:PropertyGridEditorDefinition Category="Properties">
                                            <ig:PropertyGridEditorDefinition.TargetProperties>
                                                <system:String>BraiderProductId</system:String>
                                            </ig:PropertyGridEditorDefinition.TargetProperties>
                                            <ig:PropertyGridEditorDefinition.EditTemplate>
                                                <DataTemplate>
                                                    <ComboBox
                                                            ItemsSource="{Binding Source={StaticResource AreaDetailsViewModel}, Path=ProductionPlanReference.BraiderProducts}"
                                                            DisplayMemberPath="BraiderNumber"
                                                            SelectedValuePath="BraiderProductId"                                       
                                                        >
                                                        <ComboBox.SelectedItem>
                                                            <MultiBinding Converter="{StaticResource SelectedValuesConverter}" >
                                                                <Binding Path="Value" Mode="TwoWay"/>
                                                                <Binding Path="ProductionPlanReference.BraiderProducts" Source="{StaticResource AreaDetailsViewModel}" Mode="OneWay"/>
                                                            </MultiBinding>
                                                        </ComboBox.SelectedItem>
                                                    </ComboBox>
                                                </DataTemplate>
                                            </ig:PropertyGridEditorDefinition.EditTemplate>
                                        </ig:PropertyGridEditorDefinition>
                                        <ig:PropertyGridEditorDefinition Category="Update History">
                                            <ig:PropertyGridEditorDefinition.EditTemplate>
                                                <DataTemplate>
                                                    <TextBlock Text ="{Binding Value}" Style="{StaticResource PropertyDataTextBlockStyle}"/>
                                                </DataTemplate>
                                            </ig:PropertyGridEditorDefinition.EditTemplate>
                                        </ig:PropertyGridEditorDefinition>
                                    </ig:XamPropertyGrid.EditorDefinitions>
                                </ig:XamPropertyGrid>

                                <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center">
                                    <Button Style="{StaticResource PropertyButtonStyle}" Content="Save" Command="{Binding SaveProductionPlanCommand}"
                                                IsEnabled="{Binding CloneSelectedProductionPlan.IsChange}" />
                                    <Button Style="{StaticResource PropertyButtonStyle}" Content="Cancel" Command="{Binding CancelProductionPlanCommand}"
                                                IsEnabled="{Binding CloneSelectedProductionPlan.IsCancelEnable}" />
                                    <Button Style="{StaticResource PropertyButtonStyle}" Content="Delete" Command="{Binding DeleteProductionPlanCommand}"
                                                Visibility="{Binding CloneSelectedProductionPlan.IsAddNew,Converter={StaticResource InvertBooleanVisibilityConverter},ConverterParameter=Collapsed}" />
                                </StackPanel>

                                <StackPanel Grid.Row="2">
                                    <vuc:ValidationSummary x:Name="vs6" />
                                    <TextBlock Text="{Binding CloneSelectedProductionPlan.ErrorMessage}" Style="{StaticResource ErrorTextBlockStyle}" />
                                </StackPanel>
                            </Grid>

                            <!--Schedule properties-->
                            <Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Visibility="{Binding CloneSelectedSchedule,Converter={StaticResource ObjectNullVisibilityConverter}}">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="*" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>

                                <ig:XamPropertyGrid Grid.Row="0"  SelectedObject="{Binding CloneSelectedSchedule}" ScrollBarVisibility="Auto" FilterAreaVisibility="Collapsed" >
                                    <ig:XamPropertyGrid.ItemFilters>
                                        <ig:PropertyGridConditionGroup LogicalOperator="Or" >
                                            <ig:PropertyGridComparisonCondition  Operator="Equals"  OperandSource="CategoryName" Value="Properties" ></ig:PropertyGridComparisonCondition>
                                            <ig:PropertyGridComparisonCondition  Operator="Equals"  OperandSource="CategoryName" Value="Update History" ></ig:PropertyGridComparisonCondition>
                                        </ig:PropertyGridConditionGroup>
                                    </ig:XamPropertyGrid.ItemFilters>
                                    <ig:XamPropertyGrid.EditorDefinitions>
                                        <ig:PropertyGridEditorDefinition Category="Properties">
                                            <ig:PropertyGridEditorDefinition.TargetProperties>
                                                <system:String>ReasonCodeId</system:String>
                                            </ig:PropertyGridEditorDefinition.TargetProperties>
                                            <ig:PropertyGridEditorDefinition.EditTemplate>
                                                <DataTemplate>
                                                    <ComboBox x:Name="comboBox"
                                                            ItemsSource="{Binding Source={StaticResource AreaDetailsViewModel}, Path=ReasonCodesSourceComboList}"
                                                            DisplayMemberPath="Description"
                                                            SelectedValuePath="ReasonCodeId"                                       
                                                        >
                                                        <ComboBox.SelectedItem>
                                                            <MultiBinding Converter="{StaticResource SelectedValuesConverter}" >
                                                                <Binding Path="Value" Mode="TwoWay"/>
                                                                <Binding Path="ReasonCodesSourceComboList" Source="{StaticResource AreaDetailsViewModel}" Mode="OneWay"/>
                                                            </MultiBinding>
                                                        </ComboBox.SelectedItem>
                                                    </ComboBox>
                                                </DataTemplate>
                                            </ig:PropertyGridEditorDefinition.EditTemplate>
                                        </ig:PropertyGridEditorDefinition>

                                        <ig:PropertyGridEditorDefinition Category="Properties">
                                            <ig:PropertyGridEditorDefinition.TargetProperties>
                                                <system:String>ScheduleRepeatId</system:String>
                                            </ig:PropertyGridEditorDefinition.TargetProperties>
                                            <ig:PropertyGridEditorDefinition.EditTemplate>
                                                <DataTemplate>
                                                    <Grid>
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="*" />
                                                            <ColumnDefinition Width="Auto" />
                                                        </Grid.ColumnDefinitions>
                                                        <Grid.RowDefinitions>
                                                            <RowDefinition Height="Auto" />
                                                            <RowDefinition Height="Auto" />
                                                        </Grid.RowDefinitions>
                                                        <Border Grid.RowSpan="2" Grid.ColumnSpan="2" BorderThickness="1" BorderBrush="{StaticResource LightGrayColor}" />

                                                        <!--<TextBox Grid.Row="0" Grid.Column="0" Style="{StaticResource PropertyTextBoxStyle}" IsReadOnly="True"
                                                                Text="{Binding Source={StaticResource AreaDetailsViewModel}, Path= CloneSelectedReasonCode.Parent,Converter={StaticResource ReasonCodeToTextConverter}}" />
                                                        <Button Grid.Row="0" Grid.Column="1" x:Name="ReasonCodeBtn" Command="{Binding Source={StaticResource AreaDetailsViewModel}, Path=ParentReasonTreeClickCommand}" Style="{StaticResource PropertyButtonStyle}" Margin="0" Content="{Binding Source={StaticResource AreaDetailsViewModel}, Path=ParentReasonTreeButtonContent}" />-->

                                                        <!--<ig:Xam Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" x:Name="ParentReasonCodeTreeView" Visibility="{Binding Source={StaticResource AreaDetailsViewModel}, Path=ParentReasonTreeVisibility}"
                                                                ItemsSource="{Binding Source={StaticResource AreaDetailsViewModel}, Path=ReasonCodesSourceList}" Height="250" ActiveDataItem="{Binding Source={StaticResource AreaDetailsViewModel}, Path= CloneSelectedReasonCode.Parent, Mode=TwoWay}" >
                                                            <ig:XamDataTree.GlobalNodeLayouts>
                                                                <ig:NodeLayout Key="ReasonCodeId" TargetTypeName="ReasonCodeModel" DisplayMemberPath="Description" />
                                                            </ig:XamDataTree.GlobalNodeLayouts>
                                                        </ig:Xam>-->
                                                        <ListView Name="lvDataBinding" ItemsSource="{Binding ListViewDemo}">
                                                            <ListView.ItemTemplate>
                                                                <DataTemplate>
                                                                    <WrapPanel>
                                                                        <TextBlock Text="IsEveryMonday: " />
                                                                        <TextBlock Text="{Binding IsEveryMonday}" FontWeight="Bold" />
                                                                        <TextBlock Text=", " />
                                                                        <TextBlock Text="ScheduleRepeatID: " />
                                                                        <TextBlock Text="{Binding ScheduleRepeatID}" FontWeight="Bold" />
                                                                    </WrapPanel>
                                                                </DataTemplate>
                                                            </ListView.ItemTemplate>
                                                        </ListView>

                                                    </Grid>
                                                </DataTemplate>
                                            </ig:PropertyGridEditorDefinition.EditTemplate>
                                        </ig:PropertyGridEditorDefinition>
                                        
                                        <ig:PropertyGridEditorDefinition Category="Update History">
                                            <ig:PropertyGridEditorDefinition.EditTemplate>
                                                <DataTemplate>
                                                    <TextBlock Text ="{Binding Value}" Style="{StaticResource PropertyDataTextBlockStyle}"/>
                                                </DataTemplate>
                                            </ig:PropertyGridEditorDefinition.EditTemplate>
                                        </ig:PropertyGridEditorDefinition>
                                    </ig:XamPropertyGrid.EditorDefinitions>
                                </ig:XamPropertyGrid>

                                <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center">
                                    <Button Style="{StaticResource PropertyButtonStyle}" Content="Save" Click="ButtonBase_OnClick" Command="{Binding SaveScheduleCommand}"
                                                IsEnabled="{Binding CloneSelectedSchedule.IsChange}" />
                                    <Button Style="{StaticResource PropertyButtonStyle}" Content="Cancel" Command="{Binding CancelScheduleCommand}"
                                                IsEnabled="{Binding CloneSelectedSchedule.IsCancelEnable}" />
                                    <Button Style="{StaticResource PropertyButtonStyle}" Content="Delete" Command="{Binding DeleteScheduleCommand}"
                                                Visibility="{Binding CloneSelectedSchedule.IsAddNew,Converter={StaticResource InvertBooleanVisibilityConverter},ConverterParameter=Collapsed}" />
                                </StackPanel>

                                <StackPanel Grid.Row="2">
                                    <vuc:ValidationSummary x:Name="vs8" />
                                    <TextBlock Text="{Binding CloneSelectedSchedule.ErrorMessage}" Style="{StaticResource ErrorTextBlockStyle}" />
                                </StackPanel>


                            </Grid>

                        </Grid>
                    </igDock:ContentPane>
                </igDock:SplitPane>
            </igDock:XamDockManager.Panes>
        </igDock:XamDockManager>
    </Grid>
    <!--    </vuc:BusyIndicator>-->
</visi:VisiPage>
